package com.sunlands.qdcy.tongzhuo.constant;

/**
 * 消息类型
 */
public enum MsgType {
    /**
     * 日记和消息相关的
     */

    interact_notice("互动通知", "798"),

    group_text("创建日记发送到群", "200"),

    person_text("创建日记发送给道友", "700"),

    ;

    MsgType(String tips, String code) {
        this.tips = tips;
        this.code = code;
    }

    private String tips;
    private String code;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public static MsgType getMsgType(String code) {
        for (MsgType field : MsgType.values()) {
            if (code.equals(field.getCode())) {
                return field;
            }
        }
        return null;
    }
}
